@import url(https://fonts.googleapis.com/css?family=Open+Sans:600);
.frame {
  position: absolute;
  width: 400px;
  height: 400px;
  inset: 0;
  margin: auto;
  box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  background: linear-gradient(to top right, #d2592a 0%, #fdb03a 100%);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  overflow: hidden;
  color: #fff;
}

.counter {
  position: absolute;
  width: 130px;
  height: 40px;
  inset: 0;
  margin: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 2px 8px 12px rgba(0, 0, 0, 0.1);
}
.counter .minus {
  position: absolute;
  z-index: 10;
  width: 32px;
  height: 32px;
  inset: 0;
  margin: auto;
  margin-left: 5px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
.counter .minus .line {
  position: absolute;
  height: 2px;
  width: 18px;
  inset: 0;
  margin: auto;
  background: #e26e6e;
  transition: all 0.3s ease-in-out;
}
.counter .minus:hover {
  background: #e26e6e;
}
.counter .minus:hover .line {
  background: #fff;
}
.counter .plus {
  position: absolute;
  width: 32px;
  height: 32px;
  z-index: 10;
  inset: 0;
  margin: auto;
  margin-right: 5px;
  border-radius: 50%;
  transition: all 0.3s ease-in-out;
}
.counter .plus .line-h, .counter .plus .line-v {
  position: absolute;
  width: 18px;
  height: 2px;
  background: #8ed273;
  inset: 0;
  margin: auto;
  transition: all 0.3s ease-in-out;
}
.counter .plus .line-v {
  height: 18px;
  width: 2px;
}
.counter .plus:hover {
  background: #8ed273;
}
.counter .plus:hover .line-h,
.counter .plus:hover .line-v {
  background: #fff;
}
.counter .number {
  position: relative;
  width: 100%;
  height: 100%;
  font-size: 20px;
  font-weight: 600;
  color: #6a85a0;
  line-height: 40px;
  text-align: center;
}
.counter .number span {
  display: block;
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
}
.counter .number span.fadeInUp {
  animation: fadeIn 0.3s ease-out 0.15s backwards;
  transform: scale(1);
  opacity: 1;
}
.counter .number span.fadeOutUp {
  animation: fadeOut 0.3s ease-in;
  transform: scale(1.4);
  opacity: 0;
}
.counter .number span.fadeInDown {
  animation: fadeOut 0.3s ease-out 0.15s reverse backwards;
  transform: scale(1);
  opacity: 1;
}
.counter .number span.fadeOutDown {
  animation: fadeIn 0.3s ease-in reverse;
  transform: scale(0.6);
  opacity: 0;
}

@keyframes fadeIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes fadeOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.4);
    scale: 0;
  }
}